header {/*
    margin-top: 0.2em;
    box-shadow: 0 0 20px #0002;
*/}
header .container.desktop {
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}
header .container.phone {
    display: none;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 0.5em;
    gap: 0.5em;
}
header .element-1 {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

header .top .right {
    display: flex;
    width: 50%;
    justify-content: space-around;
}
header .top a img {
    margin-right: 1em;
}
header .top a:hover {
    color: var(--colorLightPrimary);
}
header .top .left a:hover {
    cursor: default;
}
header .bottom {
    margin: 1em 0;
}
header .bottom h3 a {
    font-weight: 800;
}
header .bottom h3 a:hover {
    color: var(--colorLightPrimary);
}
header .bottom .left {
    display: flex;
    width: 100%;
    gap: 1.5em;
}
header .bottom .left a {
    font-weight: 500;
    color: var(--colorPrimaryBlack);
}


header .bottom .left ul {
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;

    padding: 0;
    margin: 0;
    width: 100%;
    padding-top: 1em;
    gap: 0.5em;
}

header .bottom .right {
    display: flex;
    align-items: center;
    padding-top: 1em;
    gap: 1em;
}


/* Для анимашки */
header .bottom .left ul a {
    position: relative;
}
header .bottom .left ul a:hover {
    color: var(--colorMain);
}
header .bottom .left ul a::before {
    content: '';
    position: absolute;
    bottom: -0.35em;
    background-color: var(--colorMain);
    height: 3px;
    width: 0%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

header .bottom .left ul a:hover::before {
    width: 100%;
    opacity: 1;
}

header .container.phone .contact {
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

/*
 * Стили для гамбургера
 */
header .container.phone .hamburger {
    display: block;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 15px;
    z-index: 1001;
}
header .container.phone .hamburger.active {
    position: absolute;
    top: 4em;
    left: calc(80% - 1.5em);
}

header .container.phone .hamburger-box {
    display: inline-block;
    position: relative;
    width: 30px;
    height: 24px;
}

header .container.phone .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

header .container.phone .hamburger-inner,
header .container.phone .hamburger-inner::before,
header .container.phone .hamburger-inner::after {
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: #000;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

header .container.phone .hamburger-inner::before,
header .container.phone .hamburger-inner::after {
    content: "";
    display: block;
}

header .container.phone .hamburger-inner::before {
    top: -10px;
}

header .container.phone .hamburger-inner::after {
    bottom: -10px;
}

/* Анимация в крестик */
header .container.phone .hamburger.active .hamburger-inner {
    transform: rotate(45deg);
}

header .container.phone .hamburger.active .hamburger-inner::before {
    top: 0;
    transform: rotate(90deg);
}

header .container.phone .hamburger.active .hamburger-inner::after {
    top: 0;
    transform: rotate(90deg);
    opacity: 0;
}
    
header .container.phone .menu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    transition: left 0.3s ease;
    padding: 80px 20px 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}
    
header .container.phone .menu.active {
    display: block;
    left: 0;
}
    
header .container.phone .menu-list ul {
    flex-direction: column;
    gap: 20px;
}
    
header .container.phone .menu-list li {
    margin: 10px 0;
}
    
header .container.phone .social {
    margin-top: 30px;
    justify-content: flex-start;
}
    
/* Затемнение фона */
header .container.phone .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
    
header .container.phone .menu-overlay.active {
    display: block;
}

/* Плавные переходы */
header .container.phone .menu-list ul {
    transition: all 0.3s ease;
}

header .container.phone .menu-list a {
    transition: color 0.3s ease;
}

header .container.phone .menu-list a:hover {
    color: var(--colorMainHover);
}

/* Анимация появления пунктов меню */
header .container.phone .menu.active .menu-list li {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

header .container.phone .menu.active .menu-list li:nth-child(1) { 
    animation-delay: 0.1s;
}
header .container.phone .menu.active .menu-list li:nth-child(2) { 
    animation-delay: 0.2s;
}
header .container.phone .menu.active .menu-list li:nth-child(3) { 
    animation-delay: 0.3s;
}
header .container.phone .menu.active .menu-list li:nth-child(4) { 
    animation-delay: 0.4s;
}
header .container.phone .menu.active .menu-list li:nth-child(5) { 
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}